﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="EC2011_hk1_BT6_1041326_1041337_1041373_1041448.MasterPages.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="EmployeeID" 
        DataSourceID="SqlDataSourceNhanVienTheoPhongBan">
        <Columns>
            <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" 
                InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" />
            <asp:BoundField DataField="LastName" HeaderText="LastName" 
                SortExpression="LastName" />
            <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                SortExpression="FirstName" />
            <asp:BoundField DataField="DepartmentID" HeaderText="DepartmentID" 
                SortExpression="DepartmentID" />
            <asp:BoundField DataField="Salary" HeaderText="Salary" 
                SortExpression="Salary" />
            <asp:BoundField DataField="HireDate" HeaderText="HireDate" 
                SortExpression="HireDate" />
            <asp:BoundField DataField="URLPersonalPhoto" HeaderText="URLPersonalPhoto" 
                SortExpression="URLPersonalPhoto" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceNhanVienTheoPhongBan" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PagingDataConnectionString %>" 
        SelectCommand="SELECT * FROM [Employees] WHERE ([DepartmentID] = @DepartmentID)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="DepartmentID" 
                QueryStringField="PhongBanID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
